<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>结算</title>
    <link rel="stylesheet" type="text/css" href="/static/index_user/css/aui_1.css" />
    <link rel="stylesheet" type="text/css" href="/static/index_user/css/aui-slide_1.css" />
    <style type="text/css">
        .aui-list .aui-list-header {
            background-color: #ffffff;
            text-align: center;
            justify-content: center;
            border-bottom: 1px solid #dddddd;
            font-size: 1rem;
        }

        .aui-grid [class*=aui-col-] {
            padding: 0.2rem 0;
            text-align: left;
        }

        .aui-list label {
            line-height: 1.8rem;
            width: 200px;
        }
    </style>
</head>

<body>
<header class="aui-bar aui-bar-nav" style="position: fixed;">
    <a class="aui-pull-left aui-btn">

    </a>
    <div class="aui-title">结算</div>
</header>
<div id="msg" class="" style=" display: none; width: 100%;position: fixed;top: 6%;z-index: 99;color: red;background-color: yellow;text-align: center">您有新消息,请在消息中心查看</div>
<div class="aui-tab" id="tab" style="margin-top: 48px;">

    <div class="aui-tab-item">
        <a href="{:url('user/Chicang/index')}" style="color:#ffffff">持仓平仓</a>
    </div>
    <div class="aui-tab-item  aui-active">交割单</div>
</div>
<div class="aui-content aui-margin-t-15 aui-margin-b-15" style="margin-bottom:2.5rem !important;">
    <ul class="aui-list aui-select-list">

        {if condition="$data != null"}

        {volist name="data" id="v"}
        <li class="aui-list-item">


            <div class="aui-list-item-inner">
                <section class="aui-grid">
                    <div class="aui-row">
                        <div class="aui-row">

                            <span>{$v.stockcode}--{$v.stockname}</span>
                        </div>
                        <div class="aui-row">
                            <span>买入号：</span><span>{$v.buyoid}</span>
                        </div>
                        <div class="aui-row">
                            <span>卖出号：</span><span>{$v.selloid}</span>
                        </div>
                        <div class="aui-row">
                            <span>买入时间：</span><span>{:date('Y-m-d H:i:s',$v.buytime)}</span>
                        </div>
                        <div class="aui-row">
                            <span>卖出时间：</span><span>{:date('Y-m-d H:i:s',$v.selltime)}</span>
                        </div>
                        <div class="aui-col-xs-6">
                            <span>买入价：</span><span>{$v.buyprice}</span>
                        </div>
                        <div class="aui-col-xs-6">
                            <span>卖出价：</span><span>{$v.sellprice}</span>
                        </div>

                        <div class="aui-col-xs-6">
                            <span>卖出数量：</span><span>{$v.count}</span>
                        </div>

                        <!--<div class="aui-col-xs-6">-->
                        <!--<span>询价方向：</span><span><font color="red">买涨</font></span>-->
                        <!--</div>-->
                        <div class="aui-col-xs-6">
                            <span>盈利：</span><span>{$v.yk}</span>
                        </div>



                    </div>
                </section>

            </div>
        </li>


        {/volist}
        {else /}
        <div style="margin-top:15px;margin-bottom:15px;background-color:#fff;height:100px;vertical-align:middle;text-align:center;display:flex;align-items:center;justify-content:center;">暂无数据</div>
        {/if}
    </ul>
</div>

<footer class="aui-bar aui-bar-tab" id="footer">
    <div class="aui-bar-tab-item aui-active">
        <a href="{:url('user/Index/index')}" style="color:#757575">
            <i class="aui-iconfont aui-icon-home"></i>
            <div class="aui-bar-tab-label">首页</div>
        </a>
    </div>
    <div class="aui-bar-tab-item">
        <a href="{:url('user/Xunjia/index')}" style="color:#757575">
            <i class="aui-iconfont aui-icon-cert"></i>
            <div class="aui-bar-tab-label">询价</div>
        </a>
    </div>
    <div class="aui-bar-tab-item">
        <a href="{:url('user/Chicang/index')}" style="color:#ffffff">
            <i class="aui-iconfont aui-icon-image"></i>
            <div class="aui-bar-tab-label">持仓</div>
        </a>
    </div>

    <div class="aui-bar-tab-item">
        <a href="{:url('user/UserCenter/index')}" style="color:#757575">
            <i class="aui-iconfont aui-icon-my"></i>
            <div class="aui-bar-tab-label">我的</div>
        </a>
    </div>
</footer>
</body>
<script type="text/javascript" src="/static/index_user/js/api_1.js"></script>
<script type="text/javascript" src="/static/index_user/js/aui-tab_1.js"></script>
<script type="text/javascript" src="/static/index_user/js/aui-slide_1.js"></script>

</html>
<script type="text/javascript" src="/static/index_user/js/jquery-1.11.3.min.js"></script>
<script>
    showmsg();
    function showmsg() {
//        var $=jQuery;
//        console.log($);
        $.ajax({
            type: 'get',
            url: '/msg',
            dataType: 'json',
            success: function (data) {
//                console.log(data);
                if(data){
//                    console.log(111)
                    $('#msg').show();
                }else{
//                    console.log(222)
                    $('#msg').hide();
                }
            },
            error: function () {
            }
        });



        msgtimer=setTimeout('showmsg()', 2000);
    }
</script>